package com.itheima.stream流.实例;

import java.util.ArrayList;
import java.util.Collections;
import java.util.stream.Stream;

public class Demo8 {
    public static void main(String[] args) {
        ArrayList<String> listnan = new ArrayList<>();
        Collections.addAll(listnan, "张国立", "郑伊健", "张晋", "刘烨", "徐峥", "王宝强");
        ArrayList<String> listnv = new ArrayList<>();
        Stream<String> stringStream = listnan.stream().filter(s -> s.length() == 3);
        Stream<String> skip = listnv.stream().filter(s -> s.startsWith("杨")).skip(1);
        Stream<String> concat = Stream.concat(stringStream, skip);
        }
        }

class Actor {
    private String name;

    @Override
    public String toString() {
        return "Actor{" +
                "name='" + name + '\'' +
                '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Actor() {
    }

    public Actor(String name) {
        this.name = name;
    }
}